import java.util.Date;

class DateCommand implements Runnable{

	@Override
	public void run() {		
		Date d=new Date();
		for (int i=0; i<10; i++){			
			System.out.println(d.toString());
			try {
				Thread.sleep(new java.util.Random().nextInt(1000));
			} catch (InterruptedException e) {				
				e.printStackTrace();
			}
		}
	}
	
}

class CounterCommand implements Runnable{

	@Override
	public void run() {		
		for (int i=0; i<10; i++){
			System.out.println(i);
			try {
				Thread.sleep(new java.util.Random().nextInt(1000));
			} catch (InterruptedException e) {				
				e.printStackTrace();
			}
		}
	}
	
}

public class Aufgabe3 {

	public static void main(String[] args) {
		Thread t1 = new Thread(new DateCommand());
		t1.start();
		Thread t2 = new Thread(new CounterCommand());
		t2.start();
	}

}
